<?php


//Get ijml file

$siteurl = $_REQUEST['ijsource'];
/*
$handle = fopen($siteurl, "rb");
$contents = '';

while (!feof($handle))
{
	$contents .= fread($handle, 8192);
}

fclose($handle);

$handle = fopen('xsl/ijstyle.xsl', "rb");
$xslcontents = '';

while ( !feof($handle) )
{
	$xslcontents .= fread($handle, 8192);
}
fclose ($handle);

$result = '';
$msg = xslt_process($xslcontents, $contents, $result); 

echo $result;
*/

// Load the XML source
$xml = new DOMDocument;
$xml->load($siteurl);

$xsl = new DOMDocument;
$xsl->load('xsl/ijstyle.xsl');

// Configure the transformer
$proc = new XSLTProcessor;
$proc->importStyleSheet($xsl); // attach the xsl rules

echo $proc->transformToXML($xml);

?>